package com.k.demo.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.k.demo.entity.FoodKind;

@Mapper
public interface FoodKindMapper {

	@Select("select * from food_kind where is_delete=1")
	List<FoodKind> selectAll();
	
	int deleteForEach(List<Integer> deletelist);
	
	@Update("update food_kind set is_delete = 0 where food_kind_id = #{food_kind_id} and  is_delete = 1")
	int delete(int food_kind_id);
	
	int insert(FoodKind foodkind);
	
	int update(FoodKind foodkind);
	
	List<FoodKind> selectByNameAndId(FoodKind foodkind);
}
